﻿using System;

namespace CurrencyExchange
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Currency Exchange");

            Console.Write("Direction: ");
            string direction = Console.ReadLine();

            bool amd_to_usd = (direction == "AMD->USD");
            bool usd_to_amd = (direction == "USD->AMD");
            //>, <, >=, <=, ==, !=
            //bool b = true;
            //bool c = false;

            if (amd_to_usd || usd_to_amd)
            {
                Console.Write("Rate: ");
                decimal rate = decimal.Parse(Console.ReadLine());

                Console.Write("Amount: ");
                decimal amout = decimal.Parse(Console.ReadLine());

                decimal result;

                if (amd_to_usd)
                {
                    result = amout / rate;
                    Console.WriteLine(amout + " AMD = " + result + " USD");
                }

                if (usd_to_amd)
                {
                    result = amout * rate;
                    Console.WriteLine(amout + " USD = " + result + " AMD");
                }
            }
            else
            {
                Console.WriteLine("Unknown Exchange Direction!");
            }

            Console.ReadKey();
        }
    }
}
